package com.bw.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.bw.dao.OrganizationMapper;
import com.bw.entity.Organization;
import com.bw.service.OrganizationService;

@Service(value = "organizationService")
public class OrganizationServiceImpl implements OrganizationService {

    @Autowired
    private OrganizationMapper<Organization>organizationMapper;
    
    @Override
    public Integer insertSelective(Organization organization) throws Exception {
           return this.organizationMapper.insertSelective(organization);
        }

    @Override
    public Integer insertBatch(List<Organization> organization) throws Exception {
           return this.organizationMapper.insertBatch(organization) ;
        }

    @Override
    public Integer deleteByPrimaryKey(Object id) {
            return this.organizationMapper.deleteByPrimaryKey(id);
    }

    public Integer deleteBatchByPrimaryKey(List<Object> ids) {
           return this.organizationMapper.deleteBatchByPrimaryKey(ids);
    }

    @Override
    public Integer updateByPrimaryKeySelective(Organization organization) {
           return this.organizationMapper.updateByPrimaryKeySelective(organization);
    }

    @Override
    public Organization findById(Object id) {
           return (Organization) this.organizationMapper.selectByPrimaryKey(id);
    }

    @Override
    public List<Organization> selectByCondition(Organization organization) {
           return (List<Organization>) this.organizationMapper.selectByCondition(organization);
    }

    @Override
    public Integer selectCountByCondition(Organization organization) {
           return  this.organizationMapper.selectCountByCondition(organization);
    }

}
